<template>
  <ElConfigProvider :locale="zhCn">
    <div style="margin: 25px 20px;">
      <ElTable :data="data">
        <ElTableColumn type="index" label="#" :width="50" align="center" />
        <ElTableColumn prop="userName" label="记录人员" />
        <ElTableColumn prop="recordTime" label="记录时间" />
      </ElTable>
    </div>
    
  </ElConfigProvider>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ElTable, ElTableColumn, ElConfigProvider } from 'element-plus'
import { getHotelRecord } from '../../api'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
interface Props {
  id: number | string
}
const props = defineProps<Props>()

const data = ref([])

onMounted(() => {
  getHotelRecord(props.id)
    .then(res => {
      data.value = res || []
    })
})
</script>
